<?php
namespace app\common\validate\Post;

use think\Validate;

// 商品订单的验证器
class Comment extends Validate
{
    protected $rule = [
        'busid' => 'require',
        'postid' => 'require',
        'pid' => 'require',
        'level' => 'require',
        'content' => 'require',
        'status' => ['number', 'in:0,1'],
    ];

    protected $message = [
        'busid.require' => '用户ID必须填写',
        'postid.require' => '帖子ID必须填写',
        'pid.require' => '上级ID必须填写',
        'level.require' => '评论等级必须填写',
        'content.require' => '评论内容必须填写',
        'status.number' => '评论采纳状态的类型有误',
        'status.in' => '评论采纳状态的值有误',
    ];

}

?>